body {
  background-color: #fafafa;
}

a {
  color: #000;
  text-decoration: none;
}
*,
:after,
:before {
  box-sizing: border-box;
}
.container {
  width: 100%;
}

.cart {
  position: absolute;
  top: 75px;
  right: 300px;
}

.btn-circle {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: #fff;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.leave-enter-active,
.leave-leave-active {
  transition: all 1.2s;
}
.leave-enter,
.leave-leave-to {
  opacity: 0;
  transform: translateX(-50%);
}

.appear-enter-active {
  animation: appear-animation 0.5s;
}

.appear-leave-active {
  animation: appear-animation 0.5s reverse;
}

@keyframes appear-animation {
  0% {
    transform: translateY(-50%);
    opacity: 0;
  }
  100% {
    transform: translateY(0%);
    opacity: 1;
  }
}

/* 购物车按钮 */
.btn {
  border: 0;
  cursor: pointer;
  box-sizing: border-box;
  border-radius: 3px;
  color: #fff;
  display: flex;
  justify-content: space-around;
  position: relative;
}

.btn-small {
  padding: 0.5em 2em;
}

.btn-medium {
  padding: 0.7em 4.5em;
}

.btn-large {
  padding: 0.7em 5em;
}

.btn-info {
  background-color: #2d9cdb;
}

.btn-success {
  background-color: #27ae60;
}

.btn-danger {
  background-color: #e74c3c;
}

.btn img {
  max-width: 20px;
  margin-left: 0.5em;
}

/* 头部菜单 */

.header {
  width: 100%;
  height: 70px;
  background-color: #333333;
  box-sizing: border-box;
  padding: 0.5em;
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
}

.nav {
  width: 500px;
}

.nav-links {
  width: 100%;
  display: flex;
  justify-content: flex-start;
}

.navbar-link {
  display: block;
  padding: .5rem 1rem;
  color: #fff;
}

.link {
  list-style: none;
  padding: 0 2em;
}

.link a {
  color: #fff;
  text-decoration: none;
}

li.active a {
  color: #2d9cdb;
}

.header h2 {
  color: #e74c3c;
}
.login-btn {
  color: #fff;
}
.login {
  position: relative;
  top: 120px;
  margin-bottom: 15%;
  text-align: center;
}

.form-signin {
  width: 100%;
  max-width: 330px;
  padding: 15px;
  margin: auto;
}
.font-weight-normal {
  font-weight: 400 !important;
}
.mb-3,
.my-3 {
  margin-bottom: 1rem !important;
}
.h3,
h3 {
  font-size: 1.75rem;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
label {
  display: inline-block;
}

.form-signin input[type="email"] {
  margin-bottom: -1px;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}

.form-signin .form-control {
  position: relative;
  box-sizing: border-box;
  height: auto;
  padding: 10px;
  font-size: 16px;
}
.form-signin .form-control:focus {
  z-index: 2;
}
.form-control:focus {
  color: #495057;
  background-color: #fff;
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgb(0 123 255 / 25%);
}
.form-signin input[type="password"] {
  margin-bottom: 10px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

button,
input {
  overflow: visible;
}

.text-muted {
  color: #6c757d !important;
}
.text-muted a:hover {
  color: #0056b3;
  text-decoration: underline;
}
.text-muted a {
  color: #42b983;
}
.btn:not(:disabled):not(.disabled) {
  cursor: pointer;
}
.btn-block {
  display: block;
  width: 100%;
}
.btn-group-lg > .btn,
.btn-lg {
  padding: 0.5rem 1rem;
  font-size: 1.25rem;
  line-height: 1.5;
  border-radius: 0.3rem;
}
.btn-primary {
  color: #fff;
  background-color: #007bff;
  border-color: #007bff;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}

.col {
  flex-basis: 0;
  flex-grow: 1;
  max-width: 100%;
  position: relative;
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
}
.form-signup {
  width: 100%;
  max-width: 500px;
  padding: 15px;
  margin: auto;
}
.mb-4,
.my-4 {
  margin-bottom: 1.5rem !important;
}
.mb-3,
.my-3 {
  margin-bottom: 1rem !important;
}

.form-control {
  display: block;
  width: 100%;
  height: calc(1.5em + 0.75rem + 2px);
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

button,
input {
  overflow: visible;
}
button,
input,
optgroup,
select,
textarea {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

.invalid-feedback {
  display: none;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 80%;
  color: #dc3545;
}

.mb-3,
.my-3 {
  margin-bottom: 1rem !important;
}

.text-muted a:hover {
  color: #0056b3;
  text-decoration: underline;
}
.text-muted a {
  color: #42b983;
}
h1 {
  margin-top: 0;
  line-height: 1.2;
  font-size: 1.75rem;
}

.col,
.col-1,
.col-2,
.col-3,
.col-4,
.col-5,
.col-6,
.col-7,
.col-8,
.col-9,
.col-10,
.col-11,
.col-12,
.col-auto,
.col-lg,
.col-lg-1,
.col-lg-2,
.col-lg-3,
.col-lg-4,
.col-lg-5,
.col-lg-6,
.col-lg-7,
.col-lg-8,
.col-lg-9,
.col-lg-10,
.col-lg-11,
.col-lg-12,
.col-lg-auto,
.col-md,
.col-md-1,
.col-md-2,
.col-md-3,
.col-md-4,
.col-md-5,
.col-md-6,
.col-md-7,
.col-md-8,
.col-md-9,
.col-md-10,
.col-md-11,
.col-md-12,
.col-md-auto,
.col-sm,
.col-sm-1,
.col-sm-2,
.col-sm-3,
.col-sm-4,
.col-sm-5,
.col-sm-6,
.col-sm-7,
.col-sm-8,
.col-sm-9,
.col-sm-10,
.col-sm-11,
.col-sm-12,
.col-sm-auto,
.col-xl,
.col-xl-1,
.col-xl-2,
.col-xl-3,
.col-xl-4,
.col-xl-5,
.col-xl-6,
.col-xl-7,
.col-xl-8,
.col-xl-9,
.col-xl-10,
.col-xl-11,
.col-xl-12,
.col-xl-auto {
  position: relative;
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
}

/* product-list */
.listOfProducts {
  width: 100%;
  max-width: 1000px;
  margin: 70px auto 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  padding: 0;
}

.product {
  width: 300px;
  background-color: #fff;
  list-style: none;
  box-sizing: border-box;
  padding: 1em;
  margin: 1em 0;
  display: flex;
  flex-direction: column;
  border-radius: 7px;
}

.cart-btn {
  width: 180px;
}

.list-product-name {
  width: 100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space: nowrap;
  font-size: 1.2em;
  font-weight: normal;
}

.list-product-name:hover {
  cursor: pointer;
  text-decoration: underline;
}

.list-product-price {
  color: #e01222;
  font-size: 24px;
  width: 100%;
  align-self: flex-start;
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5em;
}
.list-product-price em {
  font-style: normal;
  font-size: 14px;
}
/* cart */
.checkout-box {
  width: 100%;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  margin: 120px auto;
  box-sizing: border-box;
  padding: 1em;
}

.checkout-list {
  padding: 0;
}

.checkout-product {
  display: grid;
  grid-template-columns: 0.5fr 3fr 1fr 1fr 1.5fr 0.5fr;
  background-color: #fff;
  box-shadow: 0px 0px 10px rgba(73, 74, 78, 0.1);
  border-radius: 5px;
  list-style: none;
  box-sizing: border-box;
  padding: 0.8em;
  margin: 1em 0;
}

.checkout-product * {
  place-self: center;
}
.cart-product-image {
  grid-column: 1/2;
  width: 50%;
}

.cart-product-name {
  width: 100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space: nowrap;
}

.cart-product-price {
  font-size: 1.2em;
  font-weight: bold;
}

.product-remove {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 0;
  background-color: #e0e0e0;
  color: #fff;
  cursor: pointer;
}

.total {
  font-size: 2em;
  font-weight: bold;
  align-self: flex-end;
}

.total .count {
  font-size: 14px;
  font-style: normal;
  font-weight: normal;
  display:inline-block;
  margin-right: 10px;
}

.checkout-message {
  font-size: 1.5em;
}

.fade-enter-active,
.fade-leave-active {
  transition: all 0.5s;
}

.fade-enter,
.fade-leave-to {
  transform: translateX(-40px);
  opacity: 0;
}
h3 {
  display: block;
  font-size: 1.17em;
  margin-block-start: 1em;
  margin-block-end: 1em;
  margin-inline-start: 0px;
  margin-inline-end: 0px;
  font-weight: bold;
}

/* detail */
.product-box {
  width: 800px;
  height: 400px;
  margin: 50px auto;
  box-sizing: border-box;
  padding: 1.5em;
  background-color: #fff;
  border-radius: 7px;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.product-image img {
  width: 300px;
}

.product-info {
  width: 400px;
  align-self: flex-start;
}

.product-title {
  font-weight: normal;
}

.product-price {
  font-size: 2em;
  font-weight: bolder;
}

.product-box button {
  margin: 0.3em 0;
}

.stars-box {
  display: flex;
  flex-direction: column;
}

.stars {
  width: 80%;
}
.star-bg {
  fill: #c4c4c4;
}
.star-fill {
  fill: #f2c94c;
}
.star-path {
  fill: #ffffff;
}

.total-stars {
  box-sizing: border-box;
  padding: 0.5em 0;
}

/* 弹出框 */
.mask {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}
.modal {
  width: 100%;
  max-width: 500px;
  height: 300px;
  box-sizing: border-box;
  padding: 1em;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  box-shadow: 0 0 10px rgba(144, 144, 144, 0.2);
  border: 0;
  border-radius: 5px;
  line-height: 1.5em;
  opacity: 1;
  transition: all 0.5s;
  z-index: 1;
}

.modal button {
  position: absolute;
  bottom: 10px;
  right: 10px;
}

.fade-enter-active,
.fade-leave-active {
  transition: all 0.7s;
}
.fade-enter,
.fade-leave-to {
  opacity: 0;
}
